<?php

use Drupal\youji_income_order\Entity\YoujiIncomeOrder;

function youji_income_order_youji_income_order_add_page() {
  $e = new YoujiIncomeOrder();
  module_load_include('inc', 'youji_income_order', 'youji_income_order.forms');
  return drupal_get_form('youji_income_order_youji_income_order_entity_form', $e, 'add');
}

function youji_income_order_youji_income_order_view_page(YoujiIncomeOrder $e) {
  return entity_view($e->entityType(), [$e]);
}

function youji_income_order_youji_income_order_edit_page(YoujiIncomeOrder $e) {
  module_load_include('inc', 'youji_income_order', 'youji_income_order.forms');
  return drupal_get_form('youji_income_order_youji_income_order_entity_form', $e, 'edit');
}

function youji_income_order_youji_income_order_delete_page(YoujiIncomeOrder $e) {
  module_load_include('inc', 'youji_income_order', 'youji_income_order.forms');
  return drupal_get_form('youji_income_order_youji_income_order_delete_form', $e);
}


use Drupal\youji_income_order\Entity\YoujiIncomeOrderLine;

function youji_income_order_youji_income_order_line_add_page() {
  $e = new YoujiIncomeOrderLine();
  module_load_include('inc', 'youji_income_order', 'youji_income_order.forms');
  return drupal_get_form('youji_income_order_youji_income_order_line_entity_form', $e, 'add');
}

function youji_income_order_youji_income_order_line_view_page(YoujiIncomeOrderLine $e) {
  return entity_view($e->entityType(), [$e]);
}

function youji_income_order_youji_income_order_line_edit_page(YoujiIncomeOrderLine $e) {
  module_load_include('inc', 'youji_income_order', 'youji_income_order.forms');
  return drupal_get_form('youji_income_order_youji_income_order_line_entity_form', $e, 'edit');
}

function youji_income_order_youji_income_order_line_delete_page(YoujiIncomeOrderLine $e) {
  module_load_include('inc', 'youji_income_order', 'youji_income_order.forms');
  return drupal_get_form('youji_income_order_youji_income_order_line_delete_form', $e);
}
